<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>{$sysInfo.title} - 登录</title>
    {load_js('jquery')}
    {load_ui(ROOT_URL . '/public')}
    <link rel="stylesheet" href="<?php echo ROOT_URL; ?>/public/system/css/login.css">
</head>
<body>

<div class="uk-grid">
    <div class="uk-width-1-2@l dux-login">
        <div class="login-body">
            <div class="login-head uk-text-center">
                <h1>{$sysInfo.name}</h1>
                <p class="uk-text-middle">管理登录</p>
            </div>
            <div class="login-form uk-width-1-2 uk-margin-auto">
                <form action="" class="uk-margin-medium-top dux-form uk-form  uk-form-stacked">
                    <div class="uk-form-group">
                        <input type="text" name="username" class="uk-input" placeholder="用户名">
                    </div>
                    <div class="uk-form-group">
                        <input type="password" name="password" class="uk-input" placeholder="密码">
                    </div>

                    <div class="uk-form-group">
                        <div class="alert uk-alert uk-alert-danger hide"></div>
                    </div>
                    <div class="uk-form-group uk-margin-medium-top">
                        <button class="uk-button uk-button-primary uk-button-block">
                            <span uk-icon="sign-in"></span>
                            登 录
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="uk-width-1-2@l dux-copyright ">
        <div class="copyright uk-text-center">
        <h2>欢迎使用{$sysInfo.title}</h2>
        <p>Copyright © 2013 ~ {date('Y')} <a href="{$sysInfo.home}" target="_blank">{$sysInfo.team}</a></p>
        </div>
    </div>
</div>
</body>

<script type="text/javascript" src="<?php echo ROOT_URL; ?>/public/system/js/lib.js"></script>
<script>
    $(function () {
        Do('base', function() {
        $('form').submit(function (e) {
            e.preventDefault();
            app.ajax({
                url : '{url()}',
                type : 'post',
                data : $('form').serialize(),
                tip : false,
                success : function(msg) {
                    $('.alert').addClass('hide');
                    window.location.href = '{url("system/Index/index")}';
                },
                error : function(msg) {
                    $('.alert').removeClass('hide').text(msg);
                }
            });
        });

        });
    });
</script>
</html>